<template>
	<div class="registerReturn flex flex_flow" :style="{'height':bodyHeight+'px'}">
		<div class="registerReturn_logo">
			<img src="../../../../static/img/images/logo3.png" />
		</div>
		<div class="registerReturn_text flex2 flex flex_flow justify_cen">
			  <el-button round class='registerReturn_text_button' @click='jump'>{{statusName}}</el-button>
			  <p>{{name}}</p>
		</div>
	</div>
</template>

<script>
	export default {
		data: function() {
			return {
				bodyHeight:0,
				name:'',
				statusName:'',
			}
		},
		mounted() {
			this.bodyHeight=document.body.offsetHeight;
			this.get_member_status();
		},
		methods: {
			get_member_status(){
				const loading=this.$loading({
		          lock: true,
		          text: '加载中',
		          spinner: 'el-icon-loading',
		          background: 'rgba(255, 255, 255, 1)'
		        });
				this.ajax(this, {
					'url': this.defines.get_member_status,
					'type': 'post',
					'data':{
						'member_id':window.uid
					},
					'callback': data => {
						if(data.data.error_code==0) {
							console.log(data);
							let status=data.data.data.status;
							switch(parseInt(status)){
								case 1:
									this.statusName='审核中，等待人工复检';
									break;
								case 2:
									this.statusName='申请被驳回，重新注册';
									break;
								case 3:
									this.statusName='申请通过';
									break;
							}
							this.name=data.data.data.remark;
							loading.close();

						} else {
							Toast(data.data.error_msg)
						}

					},
					'errorback': errory => {

					},

				})
			},
			jump(){
				this.$router.push({
        			path: '/Jregister',
				})
			},
		}
	}
</script>

<style scoped>
	
	.registerReturn_logo{
		padding: 6rem 0 3rem 0;
		background: #000;
		
	}
	.registerReturn_logo img{
		width: 65%;
		display: block;
		margin:  0 auto;
	}
	.registerReturn_text_button{
		width: 80%;
		padding: 1rem 0;
		border-radius: 50rem;
		
		color: #f7bd40;
		font-size: 1.8rem;
		margin: 0 auto;
		margin-top: 5%;
		background: #000;
		display: block;
	}
	.registerReturn_text p{
		color: #ff0000;
		font-size: 1.5rem;
		margin-top: 5%;
		text-align: center;
	}
	.registerReturn_text{
		width: 100%;
	}
</style>